<?php
/**
 * Created by PhpStorm.
 * User: zing
 * Date: 2018/5/6
 * Time: 14:07
 */


$name = 'post.ticket/a';
if (strpos($name, '/')) { // 指定修饰符
    list($name, $type) = explode('/', $name, 2);
    echo $name . ' ' . $type . PHP_EOL;
}
if (strpos($name, '.')) { // 指定参数来源
    list($method, $name) = explode('.', $name, 2);
    echo $name . ' ' . $method . PHP_EOL;
} else { // 默认为自动判断
    $method = 'param';
}


//[0] => hello
//[1] => world
//[2] => !!
print_r(explode("/", "hello/world/!!", 3));
//[0] => hello
//[1] => world/!!
print_r(explode("/", "hello/world/!!", 2));
//[0] => hello/world/!!
print_r(explode("/", "hello/world/!!", 1));


$tickets = [
    //常
    ['supplier_ticket_id' => 1, 'biz_ticket_id' => 10, 'ticket_number' => 10],//100
    ['supplier_ticket_id' => 2, 'biz_ticket_id' => 20, 'ticket_number' => 10],//100
    ['supplier_ticket_id' => 3, 'biz_ticket_id' => 30, 'ticket_number' => 10],//100
    ['supplier_ticket_id' => 4, 'biz_ticket_id' => 40, 'ticket_number' => 20],//400
    ['supplier_ticket_id' => 5, 'biz_ticket_id' => 50, 'ticket_number' => 20],//400
    //座位票
    ['supplier_ticket_id' => 10, 'biz_ticket_id' => 100, 'ticket_number' => 1],
    ['supplier_ticket_id' => 10, 'biz_ticket_id' => 101, 'ticket_number' => 1],
    ['supplier_ticket_id' => 10, 'biz_ticket_id' => 102, 'ticket_number' => 1],
    ['supplier_ticket_id' => 10, 'biz_ticket_id' => 103, 'ticket_number' => 1],
    ['supplier_ticket_id' => 10, 'biz_ticket_id' => 104, 'ticket_number' => 1],//50
    ['supplier_ticket_id' => 11, 'biz_ticket_id' => 110, 'ticket_number' => 1],
    ['supplier_ticket_id' => 11, 'biz_ticket_id' => 111, 'ticket_number' => 1],
    ['supplier_ticket_id' => 11, 'biz_ticket_id' => 112, 'ticket_number' => 1],
    ['supplier_ticket_id' => 11, 'biz_ticket_id' => 113, 'ticket_number' => 1],
    ['supplier_ticket_id' => 11, 'biz_ticket_id' => 114, 'ticket_number' => 1],//100
    //酒店票
    ['supplier_ticket_id' => 20, 'biz_ticket_id' => 0, 'ticket_number' => 10],//100
    ['supplier_ticket_id' => 21, 'biz_ticket_id' => 0, 'ticket_number' => 10],//100
];

/**
 * supplier_ticket_id
 *
 * biz_sess_id == 0  常规票
 *
 * biz_sess_id > 0  座位票
 *
 *
 *
 * biz_hotel_id 存在为酒店票
 *
 */

